package com.rtx.edi.model.api.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.rtx.edi.model.base.BaseEntity;

import io.swagger.annotations.ApiModel;

/**
 * <p>
 * 对接场景表
 * </p>
 *
 * @author cafebabe
 * @since 2023-03-18
 */
@TableName("pl_api_mapping_config")
@ApiModel(value = "PlApiMappingConfig对象", description = "对接场景sql配置")
public class PlApiMappingConfig extends BaseEntity {
	
    private String sequence;
    private Long apiMappingId;
    private Long companyId;

    /**
     * 校验规则 
     * [{
     * "ruleName":"校验规则名称"
     * "column":"校验字段",
     * "condition":"校验条件 exists noexists lt gt ge le",
     * "value":"判断条件值",
     * "msg":"校验不通过错误信息"
     * }]
     */
    private String checkRule;
    /**
     * 查询结果行校验规则 
     * {
     * "ruleName":"校验规则名称"
     * "condition":"校验条件 exists noexists lt gt ge le",
     * "rowcount":"判断条件值",
     * "msg":"校验不通过错误信息"
     * }
     */
    private String rowCheckRule;
    //更新删除操作
	//    {
	//    	"handleType": "操作类型 DELETE 或者 UPDATE",
	//    	"handleSql": "操作sql",
	//    	"handleColumn": [{
	//    		"placeholder": "sql占位符",
	//    		"valueSource": "取值路径",
	//    		"valueType": "取值来源 request报文 query当前查询结果"
	//    	}],
	//    	"preActive": {
	//    		"ruleName": ["校验规则名称"]
	//    	}
	//    }
    private String configRule;
    /**
     * 前置状态
     * [{"ruleName":"校验规则名称","activeStatus":"生效状态 true false"}]
     */
    private String preActive;
    
    /**
     * 查询配置
     * {
     * "queryName":"查询名称",
     * "querySql":"查询SQL",
     * "queryColumn":"查询条件",
     * "queryResultName":"查询结果名称",
     * "queryRoot":"查询条件根节点",
     * "queryColumnMainValue";"查询结果主要字段"
     * }
     */
    private String queryConfig;
    

    private String whsequeryflag;
    private String queryName;
    private String querySql;
    private String queryColumn;
    private String queryResultName;
    private String queryRoot;
    private String queryColumnMainValue;
    
    
	public String getWhsequeryflag() {
		return whsequeryflag;
	}
	public void setWhsequeryflag(String whsequeryflag) {
		this.whsequeryflag = whsequeryflag;
	}
	public String getQueryName() {
		return queryName;
	}
	public void setQueryName(String queryName) {
		this.queryName = queryName;
	}
	public String getQuerySql() {
		return querySql;
	}
	public void setQuerySql(String querySql) {
		this.querySql = querySql;
	}
	public String getQueryColumn() {
		return queryColumn;
	}
	public void setQueryColumn(String queryColumn) {
		this.queryColumn = queryColumn;
	}
	public String getQueryResultName() {
		return queryResultName;
	}
	public void setQueryResultName(String queryResultName) {
		this.queryResultName = queryResultName;
	}
	public String getQueryRoot() {
		return queryRoot;
	}
	public void setQueryRoot(String queryRoot) {
		this.queryRoot = queryRoot;
	}
	public String getQueryColumnMainValue() {
		return queryColumnMainValue;
	}
	public void setQueryColumnMainValue(String queryColumnMainValue) {
		this.queryColumnMainValue = queryColumnMainValue;
	}
	public String getConfigRule() {
		return configRule;
	}
	public void setConfigRule(String configRule) {
		this.configRule = configRule;
	}
	public String getPreActive() {
		return preActive;
	}
	public void setPreActive(String preActive) {
		this.preActive = preActive;
	}
	public String getRowCheckRule() {
		return rowCheckRule;
	}
	public void setRowCheckRule(String rowCheckRule) {
		this.rowCheckRule = rowCheckRule;
	}
	public String getCheckRule() {
		return checkRule;
	}
	public void setCheckRule(String checkRule) {
		this.checkRule = checkRule;
	}
	public String getSequence() {
		return sequence;
	}
	public void setSequence(String sequence) {
		this.sequence = sequence;
	}
	public Long getApiMappingId() {
		return apiMappingId;
	}
	public void setApiMappingId(Long apiMappingId) {
		this.apiMappingId = apiMappingId;
	}
	public Long getCompanyId() {
		return companyId;
	}
	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}
	public String getQueryConfig() {
		return queryConfig;
	}
	public void setQueryConfig(String queryConfig) {
		this.queryConfig = queryConfig;
	}
	
}

